﻿@using QqhrCitizen.Models
@{
    ViewBag.Title = "轮播管理";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<div class="result-title">
    <h1 class="head-tietle">增加轮播</h1>
</div>

@using (Html.BeginForm("AddViwepager", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.AntiForgerySID()
    <table class="detail-table">
        <tr >
            <td class="row-title">标题</td>
            <td>
                <input class="textbox w-3" name="Title" />
            </td>
        </tr>
        <tr>
            <td class="row-title">副标题</td>
            <td>
                <input class="textbox w-3" name="Subtitle">
            </td>
        </tr>
        <tr>
            <td class="row-title">URL</td>
            <td>
                <input class="textbox w-3" name="URL" />（例如： http://www.baidu.com）
            </td>
        </tr>
        <tr>
            <td  class="row-title">优先级</td>
            <td>
                <input class="textbox w-3" name="Priority">
            </td>
        </tr>
        <tr>
            <td class="row-title">背景色</td>
            <td>
                <input id='colorpicker' />
                <input name="BgColor" id="bgcolor" type="hidden"/>
            </td>
        </tr>
        <tr>
            <td class="row-title">
                上传图片
            </td>
            <td>
                <input type="file" name="file" id="file" class="textbox" />
            </td>
        </tr>
    </table>
    <p><input type="submit" value="增加" class="button blue" /></p>
}



<script>
    $("#colorpicker").spectrum({
        color: "#f00",
        clickoutFiresChange: true,
        change: function (color) {
            $("#bgcolor").val(color.toHexString()); // #ff0000
        }
    });
</script>